package io.sdph.statistics;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

@Service
public class StatisticsJob {
	static final Logger log = Logger.getLogger(StatisticsJob.class);
	
	@Autowired
	IStatisticsManager statisticsManager;

	@Scheduled(cron="0 59 23 * * *")
	public void execute() {
		statisticsManager.doStatistics();
		log.debug("Statistics for today has been done.");
	}

}
